home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 078 (1990-06)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 078 (1990-06)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / MSH / src / dos.h < prev    next >
C/C++ Source or Header  |  1990-06-17  |  3KB  |  130 lines

  1.  
  2. /*
  3.  *  $Id: dos.h,v 1.30 90/06/04 23:18:20 Rhialto Rel $
  4.  *  $Log:    dos.h,v $
  5.  * Revision 1.30  90/06/04  23:18:20  Rhialto
  6.  * Release 1 Patch 3
  7.  * 
  8.  */
  9.  
  10. #ifndef EXEC_TYPES_H
  11. #include "exec/types.h"
  12. #endif
  13. #ifndef EXEC_MEMORY_H
  14. #include "exec/memory.h"
  15. #endif
  16. #ifndef EXEC_INTERRUPTS_H
  17. #include "exec/interrupts.h"
  18. #endif
  19. #ifndef EXEC_NODES_H
  20. #include "exec/nodes.h"
  21. #endif
  22. #ifndef EXEC_PORTS_H
  23. #include "exec/ports.h"
  24. #endif
  25. #ifndef EXEC_IO_H
  26. #include "exec/io.h"
  27. #endif
  28. #ifndef LIBRARIES_DOS_H
  29. #include "libraries/dos.h"
  30. #endif
  31. #ifndef LIBRARIES_DOSEXTENS_H
  32. #include "libraries/dosextens.h"
  33. #endif
  34. #ifndef LIBRARIES_FILEHANDLER_H
  35. #include "libraries/filehandler.h"
  36. #endif
  37. #ifndef DEVICES_TRACKDISK_H
  38. #include "devices/trackdisk.h"
  39. #endif
  40. #ifndef DEVICES_TIMER_H
  41. #include "devices/timer.h"
  42. #endif
  43.  
  44. /*
  45.  *  ACTIONS which do not exist in dosextens.h but which indeed exist on
  46.  *  the Amiga.
  47.  */
  48.  
  49. #define ACTION_MORECACHE    18L
  50. #define ACTION_FLUSH        27L
  51. #define ACTION_RAWMODE        994L
  52. #define ACTION_OPENRW        1004L
  53. #define ACTION_OPENOLD        1005L
  54. #define ACTION_OPENNEW        1006L
  55. #define ACTION_CLOSE        1007L
  56. #define ACTION_SEEK        1008L
  57.  
  58. #ifndef FIBB_HIDDEN
  59. #define FIBB_HIDDEN 7L
  60. #define FIBF_HIDDEN (1L<<FIBB_HIDDEN)
  61. #endif
  62.  
  63. #ifndef DE_DOSTYPE
  64. #define DE_DOSTYPE        16L
  65. #endif
  66.  
  67. #define CTOB(x) (void *)(((long)(x))>>2)    /*  BCPL conversion */
  68. #define BTOC(x) (void *)(((long)(x))<<2)
  69.  
  70. #define bmov(ss,dd,nn) CopyMem(ss,dd,(ulong)(nn))   /* Matt's habit */
  71.  
  72. #define DOS_FALSE   0L
  73. #define DOS_TRUE    -1L
  74.  
  75. typedef struct Interrupt    INTERRUPT;
  76. typedef struct Task        TASK;
  77. typedef struct FileLock     LOCK;
  78. typedef struct FileInfoBlock    FIB;
  79. typedef struct DosPacket    PACKET;
  80. typedef struct Process        PROC;
  81. typedef struct DeviceNode    DEVNODE;
  82. typedef struct DeviceList    DEVLIST;
  83. typedef struct DosInfo        DOSINFO;
  84. typedef struct RootNode     ROOTNODE;
  85. typedef struct FileHandle    FH;
  86. typedef struct MsgPort        PORT;
  87. typedef struct Message        MSG;
  88. typedef struct MinList        LIST;
  89. typedef struct MinNode        NODE;
  90. typedef struct DateStamp    STAMP;
  91. typedef struct InfoData     INFODATA;
  92. typedef struct DosLibrary    DOSLIB;
  93.  
  94. #define PType (packet->dp_Type)
  95. #define PArg1 (packet->dp_Arg1)
  96. #define PArg2 (packet->dp_Arg2)
  97. #define PArg3 (packet->dp_Arg3)
  98. #define PArg4 (packet->dp_Arg4)
  99. #define PRes1 (packet->dp_Res1)
  100. #define PRes2 (packet->dp_Res2)
  101.  
  102. #define dl_MSFileLockList   dl_unused
  103.  
  104.  
  105. /*
  106.  *  (void *)  in C means 'pointer to anything'.  I use it
  107.  *  extensively.
  108.  */
  109.  
  110. extern void *AbsExecBase;
  111.  
  112. extern struct MsgPort *CreatePort();
  113. extern void *AllocMem(), *RemHead(), *GetMsg();
  114. extern void *FindTask(), *Open(), *OpenLibrary();
  115.  
  116. extern void   *dosalloc(), *NextNode(), *GetHead(), *GetTail();
  117. extern void   btos(), returnpacket();
  118.  
  119. extern char *typetostr();
  120.  
  121. extern struct DeviceList *NewVolNode();
  122. extern void FreeVolNode();
  123. extern struct FileLock *NewFileLock();
  124. extern long FreeFileLock();
  125. extern int DiskRemoved();
  126. extern void DiskInserted();
  127. extern DEVLIST *WhichDiskInserted();
  128. extern int CheckRead();
  129. extern int CheckWrite();
  130.